from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

# 龙果
url = "http://10.59.9.8:7007/boss/login"
# url = "http://101.42.135.148:7009/roncoo-pay-web-boss/login"

# 登录界面元素配置信息
class LoginPageElements:
    """登录页面元素定位配置（优化后）"""

    # 页面信息（会员登录）
    # 账号框
    login_username = byname, 'loginName'
    login_pwd = byname, 'roncooPwd'
    login_btn = bycss, '#form1 > div.login_bar > input'


login_pe = LoginPageElements()


# 用户管理界面元素配置信息
class HomePageElements:
    """首页页面元素定位配置（优化后）"""
    # 用户管理菜单
    user_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[5]/h2'
    # 用户信息
    user_info = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[6]/ul/li/div/a'
    # 搜索框
    search_kuang = byxpath, '//input[@class="textInput" and @name="userNo"]'
    # 搜索按钮
    search_btn = bycss, '#navTab > div.navTab-panel.tabsPageContent.layoutBox > div:nth-child(2) > div.pageHeader > form > div > table > tbody > tr > td:nth-child(2) > div > div > button'
    # 用户名文本信息
    # username_text = byxpath, '//div[@class="gridBody"]//td/div[text()="宋坤"]'
    username_text = byxpath, "//table/tbody/tr/td[3]/div"
    # '退出系统'文本信息
    exit_text = byxpath, '/html/body/div[1]/div[1]/div/ul[1]/li[2]/a'
    # ’用户名或密码错误 文本信息‘
    errorts_text = byxpath, '/html/body/div/div[2]/div[1]/form/div[1]'

    # 添加用户  用户名称  手机号  登录密码 提交  条数
    add_user_btn = bycss, "a.add[title='添加用户']"
    username_inp = byname, 'userName'
    userphone_inp = byname, 'mobile'
    userpassword_inp = byname, 'password'
    tj_btn = bycss, "li div.buttonActive div.buttonContent button[type='submit']"
    # 需要加1
    tiao_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[3]/div[1]/span[2]/a'
    # 第一条用户的编号
    first_No = bycss, "#navTab > div.navTab-panel.tabsPageContent.layoutBox > div:nth-child(2) > div.pageContent.j-resizeGrid > div.grid > div.gridScroller > div > table > tbody > tr.selected > td:nth-child(2) > div"
    # 搜索的第一条用户的编号
    first_No2 = bycss, "#navTab > div.navTab-panel.tabsPageContent.layoutBox > div:nth-child(2) > div.pageContent.j-resizeGrid > div.grid > div.gridScroller > div > table > tbody > tr > td:nth-child(2) > div"


home_pe = HomePageElements()
# 权限管理
class PermElement:
    # 权限管理
    per_a=byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[2]/ul/li[2]/div/a'
    #添加权限
    add_per=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/ul/li/a'
    #权限名称
    per_name=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[1]/input'
    #权限标识
    per_biao=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[2]/input'
    #权限描述
    per_desc=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[4]/textarea'
    #保存
    per_submit=byxpath,'/html/body/div[13]/div[2]/div/form/div[2]/ul/li[1]/div/div/button'
    # 删除
    delete_per=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[2]'
    # 删除确定
    sure_pselete=byxpath,'/html/body/div[13]/div[1]/div/div[2]/ul/li[1]/a'
    # 断言 共多少条数
    per_num=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[3]/div[1]/span[2]/a'
Perm = PermElement()
#角色管理
class RoleElement:
    #角色管理
    role_href=byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[2]/ul/li[3]/div/a'
    #添加角色
    role_input=byxpath,'//*[@id="navTab"]/div[2]/div[3]/div[2]/div[1]/ul/li/a'
    #角色名称
    role_name=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[1]/input'
    # 角色编码
    role_code=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[2]/input'
    # 角色描述
    role_desc=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[3]/textarea'
    #保存
    role_submit=byxpath,'/html/body/div[13]/div[2]/div/form/div[2]/ul/li[1]/div/div/button'
    # 断言 共多少条数
    role_num=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[3]/div[1]/span[2]/a'
    #分配权限
    role_assign=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[2]'
    #选择权限
    choice_per=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/div[1]/div[2]/div/div/fieldset/label[1]/input'
    #保存
    assign_submit=byxpath,'/html/body/div[13]/div[2]/div/form/div[2]/ul/li[1]/div/div/button'
    # 删除
    role_delete=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[2]/td[6]/div/a[4]'
    # 删除确定
    sure_rdelete=byxpath,'/html/body/div[13]/div[1]/div/div[2]/ul/li[1]/a'
    #断言 权限内容
    assign_per=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/div[1]/div[2]/div/div/fieldset/label[1]'
Role=RoleElement()

# 操作员管理
class OperatorElement:
    #操作员管理
    operator_a=byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[2]/ul/li[4]/div/a'
    #添加操作员
    add_operator=byxpath,'//a[@title="添加操作员" and @href="/boss/pms/operator/addUI" and span/text()="添加操作员"]'
    #操作员姓名
    operator_name=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[2]/input'
    #操作员登录名
    oprator_email=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[3]/input'
    #密码
    oprator_pwd=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[4]/input'
    #手机号码
    oprator_mobile=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[5]/input'
    #状态 下拉框 ACTIVE
    status_select=byxpath,"//div[@id='combox_7031090' and @class='select']/select[@name='status' and @class='required']"
    #描述
    oprator_desc=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/p[8]/textarea'
    #选择角色
    chioce_role=byxpath,'/html/body/div[13]/div[2]/div/form/div[1]/fieldset/label[1]/input'
    #保存
    oprator_submit=byxpath,'/html/body/div[13]/div[2]/div/form/div[2]/ul/li[1]/div/div/button'
    #断言 操作员登录名
    oprator_logname=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[3]/div'
    #查看
    oprator_mess=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[7]/div/a[1]'
    #断言 详情
    oprator_xq=byxpath,'/html/body/div[13]/div[1]/div/div/h1'
Operator=OperatorElement()

class UserManageElements:
    # 点击用户管理
    user_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[5]/h2'
    # 用户信息
    user_info = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[6]/ul/li/div/a'
    # 添加用户  用户名称：刘北  手机号  登录密码 提交
    add_user_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/ul/li[1]/a/span'
    userName_inp = byname, 'userName'
    userphone_inp = byname, 'mobile'
    userpassword_inp = byname, 'password'
    tj_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[2]/ul/li[1]/div/div'
    # 断言用户名：用户名为刘北
    dy_userName_text = bycss, '#navTab > div.navTab-panel.tabsPageContent.layoutBox > div:nth-child(2) > div.pageContent.j-resizeGrid > div.grid > div.gridScroller > div > table > tbody > tr:nth-child(1) > td:nth-child(3) > div'

# 支付管理（支付产品信息）
class PayPageElements:
    # 侧边栏 支付管理
    pay_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[7]/h2'
    # 侧边栏 支付产品信息
    product_info = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[1]/div/a'
    # 侧边栏 用户支付配置
    pay_peizhi = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[2]/div/a'
    # 支付产品名称输入框
    product_search = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[1]/form/div/table/tbody/tr/td[1]/input'
    # 查询按钮
    search_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[1]/form/div/table/tbody/tr/td[2]/div/div/button'
    # 添加支付产品按钮
    add_product = bycss, "a.add[title='添加支付产品']"
    # 下一页
    next_ye = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[3]/div[2]/ul/li[13]/a'
    # 末页
    end_ye = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[3]/div[2]/ul/li[14]/a'
    # 支付产品编码输入框
    bianma_inp = byxpath, "//legend[text()='添加支付产品']/following::dl[dt[text()='支付产品编码：']]/dd/input"
    # 支付产品名称输入框
    name_inp = byxpath, "//legend[text()='添加支付产品']/following::dl[dt[text()='支付产品名称：']]/dd/input"

    # 点击提交 添加产品的提交
    # tj_btn = byxpath, "/html/body/div[1]/div[3]/div/div[2]/div[9]/div/form/div[2]/ul/li[1]/div/div/button"
    tj_btn = byxpath, "//button[text()='提交']"

    # 支付产品信息第一条信息的设置支付方式  上架  上架后确认  删除
    # pay_way = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[1]'
    pay_way = bycss, '#navTab > div.navTab-panel.tabsPageContent.layoutBox > div:nth-child(2) > div.pageContent.j-resizeGrid > div.grid > div.gridScroller > div > table > tbody > tr:nth-child(1) > td:nth-child(6) > div > a:nth-child(1)'
    # pay_way = byxpath, "//div[@class='gridTbody']/table/tbody/tr/td/div/a[text()='设置支付方式']"
    up_jia = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[2]'
    up_jia_btn = byxpath, '/html/body/div[13]/div[1]/div/div[2]/ul/li[1]/a'
    delete_way = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[6]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[3]'

    # 设置支付方式页面中的设置支付方式按钮
    set_pay_way_btn = bycss, "a.add[title='设置支付方式']"

    # 支付费率框
    pay_lv = byname, 'payRate'

    # 设置支付方式的 提交
    pay_way_tj_btn = bycss, "li div.buttonActive div.buttonContent button[type='submit']"

    # 设置支付方式 条数
    tiao_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[3]/div[1]/span[2]/a'

pay_pe = PayPageElements()

# 支付管理-用户支付配置
class PayConfigElement:
    # 点击支付管理
    pay_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[7]/h2'
    # 点击用户支付配置
    user_pay_config = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[2]/div/a'
    # 用户名输入框：输入：dy_userName_text
    payconfig_user_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[1]/input'
    # 支付产品名称输入框：输入：产品名称
    payconfig_product_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[2]/input'
    # 点击查询
    payconfig_search_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[3]/div/div'
    # 断言搜索出的用户名：dy_userName_text
    dy_payconfig_user_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[2]/div'
    # 点击添加支付配置
    add_payconfig_btn = byxpath, "//div[@class='pageContent j-resizeGrid']/div[@class='panelBar']/ul[@class='toolBar']/li/a[@title='添加支付配置']"
    # 点击放大镜找用户
    payconfig_user_magnifier_tb = byxpath, '//a[@lookupgroup="user"]'
    # 点击查找带回选择用户编号，用户名称
    payconfig_findback_user = byxpath, '/html/body/div[13]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[7]/div/a'
    # 点击放大镜找产品
    payconfig_product_magnifier_tb = byxpath, '//a[@lookupgroup="product"]'
    # 点击查找带回选择产品编号，产品名称
    payconfig_findback_product = byxpath, '/html/body/div[13]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[5]/div/a'
    # 风险与存期输入框
    fx_inp = bycname, 'required.digits.textInput'
    # IP白名单输入框
    ip_whitelist_inp = bycss, '#merchantServerIp'
    # 点击提交按钮
    payconfig_tj_btn = byxpath, "//button[@type='submit' and contains(text(),'提交')]"
    # 断言添加后信息第1条用户名
    dy_payconfig_username_text = byxpath, "/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[2]"
    # 点击绑定银行卡
    bind_bank_card = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[8]/div/a[1]'
    # 银行开户名输入框
    bank_account_name = byname, 'bankAccountName'
    # 银行账号
    bank_number_inp = byname, 'bankAccountNo'
    # 证件号码输入框
    id_no_inp = byname, 'cardNo'
    # 手机号输入框
    phone_inp = byname, 'mobileNo'
    # 详细地址输入框
    address_inp = byname, 'street'
    # 点击提交按钮
    tj_btn = byxpath, "//div[@class='formBar']/ul/li/div[@class='buttonActive']/div[@class='buttonContent']/button[text()='提交']"
    # tj_btn = byxpath, "//button[@type='submit' and normalize-space()='提交']"
payconfig_manage = PayConfigElement()



user_manage = UserManageElements()


class PayConfigElement:
    # 点击支付管理
    pay_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[7]/h2'
    # 点击用户支付配置
    user_pay_config = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[2]/div/a'
    # 用户名输入框：输入：dy_userName_text
    payconfig_user_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[1]/input'
    # 支付产品名称输入框：输入：产品名称
    payconfig_product_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[2]/input'
    # 点击查询
    payconfig_search_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[1]/form/div/table/tbody/tr/td[3]/div/div'
    # 断言搜索出的用户名：dy_userName_text
    dy_payconfig_user_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[2]/div'
    # 点击添加支付配置
    add_payconfig_btn = byxpath, '//a[@title="添加支付配置" and @class="add"]'
    # 点击放大镜找用户
    payconfig_user_magnifier_tb = byxpath, '//a[@lookupgroup="user"]'
    # 点击查找带回选择用户编号，用户名称
    payconfig_findback_user = byxpath, '/html/body/div[13]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[7]/div/a'
    # 点击放大镜找产品
    payconfig_product_magnifier_tb = byxpath, '//a[@lookupgroup="product"]'
    # 点击查找带回选择产品编号，产品名称
    payconfig_findback_product = byxpath, '/html/body/div[13]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[5]/div/a'
    # 风险与存期输入框
    fx_inp = bycname, 'required.digits.textInput'
    # IP白名单输入框
    ip_whitelist_inp=bycss, '#merchantServerIp'
    # 点击提交按钮
    payconfig_tj_btn=byxpath, "//button[@type='submit' and contains(text(),'提交')]"
    # 断言添加后信息第1条用户名
    dy_payconfig_username_text=byxpath, "/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[2]"
    # 点击绑定银行卡
    bind_bank_card=byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[8]/div/a[1]'
    # 银行开户名输入框
    bank_account_name=byname, 'bankAccountName'
    # 银行账号
    bank_number_inp=byname, 'bankAccountNo'
    # 证件号码输入框
    id_no_inp=byname, 'cardNo'
    # 手机号输入框
    phone_inp=byname, 'mobileNo'
    # 详细地址输入框
    address_inp=byname, 'street'
    # 点击提交按钮
    tj_btn=byxpath, "//button[@type='submit' and normalize-space()='提交']"


payconfig_manage2 = PayConfigElement()


class TradeElements:
    # 点击交易管理
    trade_manage=byxpath,'//*[@id="sidebar"]/div[2]/div[9]/h2'
    # 点击支付订单管理
    trade_order_manage=byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[10]/ul/li[2]/div/a'
    # 点击支付记录管理
    payment_history_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[10]/ul/li[3]/div/a'
    # 商户编号输入框
    merchant_code_inp=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[1]/td[1]/input'
    # 商户名称输入框
    merchant_name_inp=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[1]/td[2]/input'
    # 商户订单输入框
    merchant_order_inp=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[1]/td[3]/input'
    # 点击状态多选框
    status_checkbox=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[1]/td[4]/select'
    # 点击交易成功
    status_success=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[1]/td[4]/select/option[3]'
    # 点击查询
    search_btn=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr[3]/td[4]/div/div/button'
    # 支付订单：断言交易成功
    dy_success_text=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/div[2]/div/table/tbody/tr[1]/td[6]/div'
    # 支付记录：断言交易成功
    dy_payhistory_success_text=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/div[2]/div/table/tbody/tr[1]/td[12]/div'

trade_settpe=TradeElements()

class SettlementElements:
    # 点击结算管理
    settlement_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[11]/h2'
    # 点击结算记录管理
    settlement_records_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[12]/ul/li/div/a'
    # 输入用户名
    username_inp = byxpath, '//input[@name="userName" and @class="textInput"]'
    # 点击搜索
    search_use_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[2]/div/div'
    # 用户名：断言用户名
    dy_use_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[2]'
    # 点击发起结算
    initiate_settlement_btn = byxpath, '//a[@title="发起结算" and @class="add"]'
    # 点击放大镜图标
    magnifier_tb = byxpath, '//a[@lookupgroup="user"]'
    # 点击查找带回
    find_back = byxpath, '/html/body/div[13]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[7]/div/a'
    # 点击获取可结算余额
    get_Settle_balance = byxpath, '//a[text()="获取可结算余额"]'
    # 输入结算余额
    settle_balance = bycname, 'required.digits.textInput'
    # 点击提交
    submit_btn = byxpath, "//button[text()='提交']"
    # 错误断言：用户未设置银行账户信息!
    dy_false_text = byxpath, '/html/body/div[13]/div[1]/div/div[1]/div'
    # 点击确定按钮
    sure_btn = byxpath, '/html/body/div[13]/div[1]/div/div[2]/ul/li/a'
    # 断言：用户名
    dy_username_text = byxpath, "//div[contains(text(), '刘北')]"
    # 点击查看按钮
    view_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[10]/div/a[1]'
    # 用户编号
    get_user_bh = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[7]/div/form/div[1]/div/fieldset/dl[2]/dd'
    # 数据库断言：根据创建用户编号，断言用户名
    data_dy_user_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[9]/div'
    # 点击审核
    examine_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[10]/div/a[2]'
    # 输入审核备注:审核通过
    examine_notes_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[7]/div/form/div[1]/div/fieldset/dl[2]/dd/input'
    # 审核通过，点击提交
    examine_submit_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[7]/div/form/div[2]/ul/li[1]/div/div/button'
    # 断言状态：状态为已审核
    status_audited_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[8]/div'
    # 点击打款
    make_payment_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[10]/div/a[2]'
    # 输入打款备注：打款
    make_payment_notes_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[7]/div/form/div[1]/div/fieldset/dl[2]/dd/input'
    # 打款：点击提交
    make_payment_submit_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[7]/div/form/div[2]/ul/li[1]/div/div/button'
    # 断言状态：状态为打款成功
    status_make_payment_success_text = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[8]/div'

settle_manage=SettlementElements()
# 用户管理
class UsemessElement:
    # 用户管理
    user_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[5]/h2'
    # 用户信息
    user_info = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[6]/ul/li/div/a'
    # 添加用户
    add_user_btn = bycss, "a.add[title='添加用户']"
    # 用户名称
    username_inp = byname, 'userName'
    # 手机号
    userphone_inp = byname, 'mobile'
    # 登录密码
    userpassword_inp = byname, 'password'
    # 提交
    tj_btn = bycss, "li div.buttonActive div.buttonContent button[type='submit']"
    #断言 共多少条
    use_num=byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[7]/div[2]/div[3]/div[1]/span[2]/a'
adduser=UsemessElement()

 # 支付管理
class PayPageElements:
    # 支付管理
    pay_manage = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[7]/h2'
    #支付产品信息
    product_info = byxpath, '/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[1]/div/a'
    # 添加支付产品按钮
    add_product = bycss, "a.add[title='添加支付产品']"
    # 支付产品编码
    bianma_inp = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[1]/div/fieldset/dl[1]/dd/input'
    # 支付产品名称
    name_inp = byxpath, '//input[@type="text" and @name="productName" and @class="required textInput"]'
    # 添加产品的提交
    tj_btn = byxpath, '//button[@type="submit" and text()="提交"]'
    # 设置支付方式
    pay_way = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[1]'
    # 设置支付方式按钮
    set_pay_way_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[1]/ul/li[1]/a'
    # 支付费率
    pay_lv = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[6]/div/form/div[1]/div/fieldset/dl[3]/dd/input'
    # 设置支付方式的 提交
    pay_way_tj_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[6]/div/form/div[2]/ul/li[1]'
    # 上架
    up_jia = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[6]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[2]'
    # 断言
    tiao_btn = byxpath, '/html/body/div[1]/div[3]/div/div[2]/div[5]/div[2]/div[3]/div[1]/span[2]/a'
paypape = PayPageElements()

